<?php defined('APP_PATH') or exit('Access Denied');?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>订单日志</title>
<link rel="stylesheet" type="text/css" href="vonuo/static/css/vonuo.css">
<script type="text/javascript" src="vonuo/static/js/jquery.min.js"></script>
<script type="text/javascript" src="vonuo/static/js/tablecolor.js"></script>
<script type="text/javascript" src="vonuo/static/My97DatePicker/WdatePicker.js"></script>
</head>

<body>
<div class="gs_wraper gs_p_l0">
	<div class="tab_box">
		<table border="0" cellspacing="0" cellpadding="0" class="table_btm">
			<tr>
				<form action="<?php echo spUrl('order','log');?>" method="post">
				<td>
					<label class="txt_s_blue">管理员：</label><select name="search[aid]" class="blue_input input_w_110">
					<option></option>
					<?php foreach($admin as $v){?>
						<option value="<?php echo $v['id'];?>" <?php if($v['id']==$search['aid']){?>selected="selected"<?php }?>><?php echo $v['name'];?></option>
					<?php }?>
					</select>
					<label class="txt_s_blue">订单号：</label><input name="search[oid]" value="<?php echo $search['oid'];?>" type="text" class="blue_input input_w_110" />
					<label class="txt_s_blue">开始时间：</label><input onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" readonly name="search[stime]" value="<?php if(!empty($search['stime'])){echo date('Y-m-d H:i:s',$search['stime']);}?>" type="text" class="blue_input input_w_150" />
					<label class="txt_s_blue">结束时间：</label><input onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" readonly name="search[etime]" value="<?php if(!empty($search['etime'])){echo date('Y-m-d H:i:s',$search['etime']);}?>" type="text" class="blue_input input_w_150" />
				</td>
				</form>
				<td><a href="javascript:;" onclick="$('form:eq(0)').submit()" class="btn_select">查 询</a></td>
			</tr>
		</table>
		<table width="100%" border="0" cellpadding="0" cellspacing="0"  class="common_table">
			<tr>
				<th width="70"><input type="checkbox" onclick="$('.all_check').attr('checked',$(this).attr('checked'))" class="all_check" /><label>编号</label></th>
				<th width="100">订单号</th>
				<th width="100">操作前订单状态</th>
				<th width="100">操作后订单状态</th>
				<th width="100">操作人员</th>
				<th width="150">操作时间</th>
				<th width="100">日志管理</th>
			</tr>
			<?php foreach($odlog as $row){?>
			<tr>
				<td><input name="id[]" type="checkbox" value="<?php echo $row['id'];?>" class="all_check" /><label><?php echo $row['id'];?></label></td>
				<td><?php echo $row['oid'];?></td><td><?php echo $odstarow[$row['osta']];?></td>
				<td><?php echo $odstarow[$row['nsta']];?></td><td><?php echo $row['admin']['name'];?></td>
				<td><?php echo date('Y-m-d H:i:s', $row['time']);?></td><input name="idrow[]" value="<?php echo $row['id'];?>" type="hidden" />
				<td><a href="<?php echo spUrl('order','loginfo',array('id'=>$row['id']));?>">[详细信息]</a></td>
			</tr>
			<?php }?>
			<tr class="bottom">
				<td colspan="7" align="right" valign="middle">
				<?php if($pager){?>
					<a href="javascript:;" onclick="location.href=('<?php echo spUrl('order','log',array('aid'=>$search['aid'],'oid'=>$search['oid'],'stime'=>$search['stime'],'etime'=>$search['etime']));?>&page='+(document.getElementById('gopage').value > <?php echo $pager['total_page'];?> ? <?php echo $pager['total_page'];?> : document.getElementById('gopage').value))" class="btn_jump f_right m_t_3">跳转</a>
					<span class="txt_color">每页<?php echo $pager['page_size'];?>条/共<?php echo $pager['total_count'];?>条记录</span>
					<span class="txt_color">当前<?php echo $pager['current_page'];?>/<?php echo $pager['total_page'];?>页</span>
					<?php if($pager['current_page']!=$pager['first_page']){?><a href="<?php echo spUrl('order','log',array('page'=>$pager['first_page'],'aid'=>$search['aid'],'oid'=>$search['oid'],'stime'=>$search['stime'],'etime'=>$search['etime']));?>">首页</a><?php }else{?><a href="javascript:;">首页</a><?php }?>
					<a href="<?php echo spUrl('order','log',array('page'=>$pager['prev_page'],'aid'=>$search['aid'],'oid'=>$search['oid'],'stime'=>$search['stime'],'etime'=>$search['etime']));?>">上一页</a>
					<a href="<?php echo spUrl('order','log',array('page'=>$pager['next_page'],'aid'=>$search['aid'],'oid'=>$search['oid'],'stime'=>$search['stime'],'etime'=>$search['etime']));?>">下一页</a>
					<?php if($pager['current_page']!=$pager['last_page']){?><a href="<?php echo spUrl('order','log',array('page'=>$pager['last_page'],'aid'=>$search['aid'],'oid'=>$search['oid'],'stime'=>$search['stime'],'etime'=>$search['etime']));?>">末页</a><?php }else{?><a href="javascript:;">末页</a><?php }?>
					<label>第</label><input type="text" class="page_input" id="gopage" size="3" value="<?php echo $pager['current_page'];?>" /><label>页</label>
				<?php }?>
				</td>
			</tr>
  		</table>
	</div>
</div>
</body>
</html>